package com.zr.daoimpl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Repository;

import com.zr.dao.InsertStationDao;
import com.zr.model.Cdisstation;
import com.zr.model.CharTrap;
/**
 * 
 * @author Administrator lxg
 *
 * @param <T>
 */
@Repository("instdaim")
public class InsertStationDaoImpl<T> extends BaseDaoImpl<T> implements InsertStationDao{
	
	@Override
	
	public void insertStation1(int disid1,int disid2) {
		
		ApplicationContext	ac = new ClassPathXmlApplicationContext("bean.xml");		
		CharTrap ct=(CharTrap) ac.getBean("charTrap");
		
		Cdisstation cds1=new Cdisstation();
		Cdisstation cds2=new Cdisstation();
		
		
		cds1.setDisid(disid1);
		ct.setCdisstationByDisid1(cds1);
		
		cds2.setDisid(disid2);
		ct.setCdisstationByDisid2(cds2);
		
		this.getCurrentSession().save(ct);
		

	}


}
